{% extends "paned.html" %}

{% block headerscript %}
    <script type='application/javascript' src='/static/js/documents/list.js'></script>
    <link rel="stylesheet" href="/static/css/generic.css" type="text/css" media="screen" />
{% endblock %}

{% block widgetheader %}
    {{project.name}} - {{storage.name}}
{% endblock %}

{% block widgetcontent %}
    <div id="workspace" class="ui-layout-center">
        {% include "documents/includes/document_list.html" %}
    </div>
{% endblock %}

{% block sidebarheader %}
    Manage Documents
{% endblock %}

{% block sidebarcontent %}
    <div id="project_manage" class="ui-layout-center">
        <h3><a href="#">{{project.name}}</a></h3>
        <div class="project_info">
            <table class="object_detail object_list"> 
                {% include "includes/generic_detail_body_table.html" with object=project fields=pfields %}
                {% include "includes/generic_detail_body_table.html" with object=storage fields=sfields %}
            </table>
            <div class="object_detail_footer form_footer ui-helper-clearfix">
                <a class="edit_link" href="{{project.get_update_url}}">Edit</a>
            </div>        
        </div>        
        <h3><a href="#">Upload a new image</a></h3>    
        <div class="project_document">
            <form id="create_object_form" action="/documents/create/" enctype="multipart/form-data" method="POST">
                {% csrf_token %}
                {{newform.file}}
                <div class="object_detail_footer form_footer ui-helper-clearfix">
                    <input type="submit" value="Submit" id="submit_document_form" disabled="disabled" />
                </div>        
            </form>
        </div>        
        <h3><a href="#">OCR images</a></h3>
        <div class="project_batch">
            <form id="create_batch_form" action="/documents/batch/" method="POST">
                {% csrf_token %}
                <select name="preset" id="batch_preset">
                    {% for preset in presets %}
                        <option value="{{preset.pk}}">{{preset.name}}</option>
                    {% endfor %}
                </select>
                <div class="object_detail_footer form_footer ui-helper-clearfix">
                    <input type="submit" value="Submit" id="submit_batch_form" disabled="disabled" />
                </div>        
            </form>
        </div>        
    </div>
{% endblock %}
